<link rel='stylesheet' href='${rc.getContextPath()}/manage/styles/colorPicker/spectrum.css' />
<style>
dl.defectLookup span.error
{
    position:absolute !important;
    left:257px;
}

.sp-dd {
    background: url("${rc.getContextPath()}/manage/styles/dwz/themes/default/images/button/imgX.png");
    background-position: -163px -1px;
    height: 18px;
    width: 16px;
    position: absolute;
    right: 0px;
    top: 0px;
    border: 1px solid #D9DFE5;
}

.sp-replacer {
    padding: 0px;
    border: 0px !important;
    background: #EDF4F5 none repeat scroll 0% 0%;
    width: 146px;
    height: 24px;
    position: relative;
}

.sp-replacer.sp-active {
    border-color: #289BE5;
}

.sp-container, .sp-palette-container {
    border-color: #BDD7E7;
}

.sp-input {
    border: 1px solid #D9DFE5;
}

.sp-preview {
    width: 127px;
    height: 22px;
    border: 1px solid #D9DFE5;
    margin: 0px;
}

</style>
<div class="pageContent">
    <form method="post"
        action="${rc.getContextPath()}/manage/andonAccount/saveAndonAccount"
        class="pageForm required-validate"
        onsubmit="return validateCallback(this,dialogAjaxDone);">
        <div class="pageFormContent" >
            <input type="hidden" name="navTabId" value="${navTabId!''}">
           
            <fieldset>
            
                 <dl>
                    <dt style="width: 120px;"><@label key="andonCode.C,colon">安灯编号：</@label></dt>
                    <dd>
                        <input name="andonCode" size="22" type="text" maxlength="60"  class="required toUp"
                        value="${andonAccount.andonCode!''}" 
                remote="${rc.getContextPath()}/manage/andonAccount/validateAndonAccount" 
                warn="<@label key='andonCodeExist.M'>安灯编号已存在</@label>" />
                    </dd>
                </dl>
               
               <dl>
                    <dt style="width: 120px;"><@label key="andonText.C,colon">安灯描述：</@label></dt>
                    <dd>
                        <input name="andonText" size="22" type="text" maxlength="60"  
                        value="${andonAccount.andonText!''}" />
                    </dd>
                </dl>
               
            <dl class="notnormal">
            <dt style="width: 120px;"><@label key='materialCode.C,colon'>物料编号：</@label></dt>
            <dd>
                <input class="required look" id="materialLookup.materialCode" name="materialCode" type="text" postField="materialCode" 
                suggestFields="materialCode,materialText" 
                suggestUrl="${rc.getContextPath()}/manage/material/componentSuggest" lookupGroup="materialLookup" 
                 
                remote="${rc.getContextPath()}/manage/andonAccount/validateAndonAccount" 
                warn="<@label key='materialCodeExist.M'>物料编号已存在</@label>" 
                />
                <a class="btnLook" href="${rc.getContextPath()}/manage/material/componentLookUp?lookupType=radio" 
                rel="materialLookup_dialog" 
                title="<@label key='select.C,materialCode.C'>选择物料</@label>" lookupGroup="materialLookup" ></a>
            </dd>
        </dl>
        <dl>
            <dt style="width: 120px;"><@label key='materialText.C,colon'>物料名称：</@label></dt>
            <dd><input id="materialLookup.materialText" name="materialText" type="text" readonly="readonly"/></dd>
        </dl>
               <dl>
                     <dt style="width: 120px;"><@label key="andonTypeText.C,colon">物流类别：</@label></dt> 
                     <dd>
                     	<input name="andonTypeCode" size="22" type="hidden" maxlength="60" class="required" 
                        value="${andonAccount.andonTypeCode!''}" readonly="readonly"/>
                        <input name="typeText" size="22" type="text" maxlength="60" class="required" 
                        value="${andonAccount.typeText!''}" readonly="readonly"/>
                      
      				</dd>
                </dl>
                
                <dl>
                    <dt style="width: 120px;"><@label key="memo.C,colon">备注</@label></dt>
                    <dd>
                        <input name="memo" size="22" type="text" maxlength="60" 
                        value="${andonAccount.memo!''}"  readonly="readonly"  />
                    </dd>
                </dl>
                             
                <dl class="defectLookup">
                    <dt style="width: 120px;"><@label key="status.C,colon">状态：</@label></dt>
                    <dd>
                    	<input name="lockFlag" type="hidden"  value="${andonAccount.lockFlag!''}"/>
                    	<input name="viewlockFlag" size="22" type="text" maxlength="60" class="required" 
                         readonly="readonly" 
                         <#if andonAccount.lockFlag?? && andonAccount.lockFlag == 0>value="<@label key="enable.C">启用</@label>" </#if>
                         <#if andonAccount.lockFlag?? && andonAccount.lockFlag == 1>value="<@label key="disable.C">禁用</@label>" </#if>/>                 
                    </dd>
                </dl>
                <dl>            
                    
                </dl>
                <dl style="height:40px;">
                    <dt style="width: 120px;"><@label key="normalColor.C,colon">正常状态颜色</@label></dt>
                    <dd>
                    <input name="normalColor" type="hidden"  value="${andonAccount.normalColor!'#FF0000'}"/>
                    <input type='text' id="viewnormalColor" name="viewnormalColor" readonly="readonly"
                    /></dd>
                </dl>
                <dl style="height:40px;">
                    <dt style="width: 120px;"><@label key="touchColor.C,colon">触发状态颜色</@label></dt>
                    <dd>
	                    <input name="touchColor" type="hidden" value="${andonAccount.touchColor!'#FF0000'}"/>
	                    <input type='text' id="viewtouchColor" name="viewtouchColor" readonly="readonly" />
                    </dd>
                </dl>    
                  </fieldset>            
        </div>
                  <div class="formBar">
            <ul>
                    <li>
                        <div class="buttonActive">
                            <div class="buttonContent">
                                <button type="submit"><@label key="save.B">保存</@label></button>
                            </div>
                        </div>
                    </li>
                    <li>
                        <div class="buttonActiveGrey">
                            <div class="buttonContent">
                                    <button type="button" class="close" ><@label key="cancel.B">取消</@label></button>
                            </div>
                        </div>
                    </li>
            </ul>
        </div>            
    </form>
</div>
<script>
$(function(){
    var dialog= $.pdialog.getCurrent();
    var normalColor=$("input[name='normalColor']",dialog);
    var touchColor=$("input[name='touchColor']",dialog);    
    $("input[name='viewnormalColor']",dialog).css("background",normalColor.val()); 
    $("input[name='viewtouchColor']",dialog).css("background",touchColor.val());
});
</script>

